<!--{include /service/service_head}-->

<div id="main-content">
		<!-- Main Content Section with everything -->

		<!-- Page Head -->
		<!-- End .clear -->
		<div class="search_box clearfix">
			<form action="/service/index.php" id="indexform" method="get">
			<label class="clearfix">
				<span>店舗：</span>
				<select name="shop_id" class="small-input">
          			<option value="0">選択してください</option>
					${Utility::Option(Utility::OptionArray($shopList, 'id', 'shop_name'), $defaultShopId)}
        		</select>
        		<input type="text" name="search_date" value="{$year}-${sprintf("%02d",$month)}-${sprintf("%02d",$day)}" onfocus="WdatePicker({lang:'jp'})" class="Wdate"/>
        		<input type="submit" name="" value="検索" />
			</label><br />
			</form>
		</div>
		<div class="content-box">
			<!-- Start Content Box -->
			<div class="content-box-header">
				<h3>予約一覧</h3>
				<ul class="content-box-tabs">

					<li><a href="#tab1" class="default-tab">详细</a></li>
					<!-- href must be unique and match the id of target div -->
					<li><a href="#tab2">编辑</a></li>
				</ul>
				<div class="clear"></div>
			</div>
			<!-- End .content-box-header -->
			<div class="content-box-content">

				<div class="tab-content default-tab" id="tab1">
					<!-- This is the target div. id must match the href of this div's tab -->
					<div class="table_box">
						<table>
						<thead class="title_head">
							<tr>
								<th class="title">時間</th>
								<th class="title"></th>
							</tr>
						</thead>
						<tbody>
							<!--{loop $hourList $index $one}-->
							<tr>
								<?php
									$tempOrderList = Preengage::GetListByHours($defaultShopId, $year, $month, $day, $one);
								?>
								<td><a href="javascript:;">{$one}時</a></td>
								<!--{loop $tempOrderList $index1 $one1}-->
								<?php
									$tempDevice = Devices::GetById($one1['device_id']);
									$tempService = Service::GetById($one1['service_id']);
									$tempUser = Users::GetUser($one1['user_id']);
									$tempStaff = Staff::getById($one1['designation_stuff'])
								?>
								<td>
									<table width="150" border="1" cellspacing="0" cellpadding="0" id="service_table">
						              <tbody>
						                <tr>
						                <!--{if $one1['device_id'] == 99999}-->
						                  <td width="75">Ghost(Designed For Exchange)(機材)</td>
						               <!--{/if}--> 
						               <!--{if $one1['device_id'] != 99999}-->
						                  <td width="75">{$tempDevice['device_name']}(機材)</td>
						               <!--{/if}--> 
						                  <td width="75">{$tempService['service_name']}</td>
						                </tr>
						                <tr>
						                  <td>${date("H:i", $one1['service_start_time'])}～${date("H:i", $one1['service_end_time'])}</td>
						                  <!--{if $one1['user_id'] > 0}-->
						                  <td>{$tempUser['family_name']} {$tempUser['personal_name']}</td>
						                  <!--{/if}--> 
						                  <!--{if $one1['user_id'] < 1}-->
						                  <td>{$one1['back1']}({$one1['back2']})</td>
						                  <!--{/if}--> 
						                </tr>
						                <tr>
											<!--{if $one1['designation_stuff'] == 99999}-->
											<td>Ghost(Designed For Exchange)</td>
											<!--{/if}--> 
											<!--{if $one1['designation_stuff'] != 99999}-->
						                  <td>{$tempStaff['family_name']} {$tempStaff['personal_name']}</td>
										  <!--{/if}--> 
						                  <td>担当<!--{if $one1['designation'] > 0}-->(指)<!--{/if}--></td>
						                </tr>
						                <tr> 
						                  <!--{if $oauthMap[11] != null && $one1['service_end_time'] > $now}-->
						                  <td><a href="/service/editOrder.php?id={$one1['id']}">編集</a></td>
						                  <!--{/if}--> 
						                  <!--{if $oauthMap[12] != null && $one1['service_end_time'] > $now}-->
						                  <td><a href="/service/index.php?id={$one1['id']}&action=del&search_date={$year}-{$month}-{$day}"
														onclick="return confirm('本当に予約をキャンセルしますか？\n担当者：{$tempStaff['family_name']} {$tempStaff['personal_name']}
														\n顧客名：{$tempUser['family_name']} {$tempUser['personal_name']}')"
														style="text-decoration: none;">削除</a></td>
						                  <!--{/if}-->
						                </tr>
						              </tbody>
						            </table>
								
								</td>
								<!--{/loop}-->
							</tr>
							<!--{/loop}--> 
							<!--{if $oauthMap[13] != null}-->
							<tr>
								<td><a class="button" href="/service/editOrder.php">予約追加</a></td>
							</tr>
							<!--{/if}-->
						</tbody>
					</table>
					</div>
					<div>
					<table>
							<tr>

								<td colspan="7"><div class="pagination"> <a href="#" title="First Page">&laquo; First</a><a href="#" title="Previous Page">&laquo; Previous</a> <a href="#" class="number" title="1">1</a> <a href="#" class="number" title="2">2</a> <a href="#" class="number current" title="3">3</a> <a href="#" class="number" title="4">4</a> <a href="#" title="Next Page">Next &raquo;</a><a href="#" title="Last Page">Last &raquo;</a> </div>

									<!-- End .pagination -->
									<div class="clear"></div></td>
							</tr>
							</table>
					</div>
				</div>
			</div>
			<!-- End .content-box-content -->
		</div>

		<!-- End .content-box -->
		<!-- End .content-box -->
		<!-- End .content-box -->
		<div class="clear"></div>
		<!-- Start Notifications -->
		<!-- End Notifications -->
		<div id="footer"> <small>
			<!-- Remove this notice or replace it with whatever you want -->

			&#169; Copyright 2011 川崎エステ　エレガントリゾート　すべての女性を美しく幸せに | Powered by <a href="#">ZHONGHUA</a> | <a href="#">Top</a> </small> </div>
		<!-- End #footer -->
	</div>
	<!-- End #main-content -->
</div>

</body>
<!-- Download From www.exet.tk-->
</html>


